#ifndef VOLUMERENDERER_H
#define VOLUMERENDERER_H

#include <QtGui/QMainWindow>
#include "ui_volumerenderer.h"
#include <QtGui/QLabel>
#include <QtGui/QPushButton>
#include <QtGui/QComboBox>
#include <QtGui/QDial>
#include <QtGui/QScrollArea>
#include <QtGui/QSpinBox>
#include <QtGui/QMouseEvent>
#include "tfviewer.h"
#include "imagelabel.h"

class VolumeRenderer : public QWidget
{
	Q_OBJECT

public:
	VolumeRenderer(QWidget *parent = 0, Qt::WFlags flags = 0);
	~VolumeRenderer();
private slots:
	void visualize(void);
	void selectInputFile(void);
	void selectTFFile(void);
	void updateWeights(int i);
	void dragFinishedEvent(int dx, int dy);
	void zoom(int amount);
private:
	ImageLabel* imageLabel;

	QScrollArea* scrollArea;

	QSpinBox* imageWidthSpinBox;
	QSpinBox* imageHeightSpinBox;
	QComboBox* inputFilenameComboBox;
	QPushButton* inputFilenameButton;
	QComboBox* inputTFComboBox;
	QPushButton* inputTFButton;
	QSlider* scaleFactorSlider;
	QSlider* thicknessSlider;
	QDial* directionXYDial;
	QSlider* directionZSlider;

	TFViewer* tfViewer;
	QSlider* tfWeights[10];

	QAction *visualizeAct;
	QPushButton* visualizeButton;

	const static string DEFAULT_TF_FILENAME;

	int mouse_x;
	int mouse_y;
};

#endif // VOLUMERENDERER_H
